from nicegui import ui

# import userlogin
# from 考试系统.数据交互层 import layoutTools
from 考试系统.数据交互层 import logdir
from 考试系统.数据交互层 import GLOBA


# from niceguiToolkit.layout import inject_layout_tool
# inject_layout_tool()


@ui.page('/注册')
def zhuce():
    GLOBA.image()
    with ui.card().style("").classes("absolute top-1/4 inset-x-1/3 w-1/3 rounded bg-slate-300 shadow-2xl bg-white opacity-80"):
        with ui.column().style("flex-direction:column;width:100%"):
            ui.label('欢迎来到注册界面').style("font-size:1.7rem;color:#352d91;align-self:center")
        with ui.column().style("gap:1.0rem;flex-direction:column"):
            ui.input('请输入要注册的账号名').style("align-self:center;font-size:1.1rem")
            ui.input('请输入密码', placeholder='只能有数字或大小写字母', password=True,
                     password_toggle_button=True).style("align-self:center")
            ui.button('手机号注册',)
            with ui.row().style("gap:21.0rem;flex-direction:row;align-self:center"):
                ui.button('返回', on_click=lambda: ui.open(logdir.主界面.new)).style("align-self:center")
                ui.button('确定', on_click=lambda: ui.notify('成功注册!')).style("align-self:flex-start")

if __name__ == '__main__':
    ui.open(zhuce)